package exception;
/**
 * throw 关键字用于主动抛出一个异常
 * */
public class ThrowDemo {
    public static void main(String[] args) {
        Person person = new Person();
        try {
            person.setAge(1000);
            System.out.println("此人年龄:"+person.getAge());
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
